const superagent = require('superagent');

const HttpRequest = require('../libs/HttpRequest');

class BasePuller {
    constructor() {
        this.BASE_URL = 'http://www.zujuan.com'
    }
    getPull(url, data) {
        return new Promise((resolve, reject) => {
            let httpRequest = new HttpRequest()
            httpRequest
                .set({
                    
                    headers: {
                        // 'Host':'www.zujuan.com',
                        'Content-Type': 'application/json',
                        'Connection': 'keep-alive',
                        'host':'www.zujuan.com',
                        'Accept': 'application/json, text/javascript, */*; q=0.01',
                        // 'Referer':'http://www.zujuan.com',
                        'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',
                    }
                })
                .get(url, data)
                .then(resolve)
                .catch(reject)
        })
    }
    postPull(url, data) {
    }
}

module.exports = BasePuller;